package com.chf.carsystem.common.util;

import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.stereotype.Component;

/**
 * 加密类
 * @author Administrator
 *
 */
@Component("encryptUtil")
public class EncryptUtil {

	public String EncryptStr(String str)
	{
		return DigestUtils.sha256Hex(str);
	}
	
	public static void main(String[] args) {
		EncryptUtil encryptUtil = new EncryptUtil();
		
		String str = encryptUtil.EncryptStr("123456");
		
		System.out.println(str);
	}
	
}
